// Code reused from NeHe's tutorial on Quaternions

#ifndef _GL_QUATERNION_H
#define _GL_QUATERNION_H


#include <GL/gl.h>			// Header File For The OpenGL32 Library
#include <GL/glu.h>			// Header File For The GLu32 Library
#include <math.h>
#include "glVector.h"

#define PI			3.14159265358979323846

class glQuaternion {
public:
	glQuaternion();
	~glQuaternion();

	void CreateMatrix(GLfloat *pMatrix);
	void CreateFromAxisAngle(GLfloat x, GLfloat y, GLfloat z, GLfloat degrees);
	void EulerToQuat(const float x, const float y, const float z);
	void normalize();
	void GetAxisAngle(glVector &v, float &angle) const;
	void Print();
	glQuaternion operator *(glQuaternion q);


private:
	GLfloat m_w;
	GLfloat m_z;
	GLfloat m_y;
	GLfloat m_x;
};

#endif
